﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.PortableExecutable;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Documents;

namespace NewWms.Extend
{
   public static class GlobalVariable
    {
         static GlobalVariable()
        {
            GetEnvironment();
        }
        public static string Machine {  get; set; }
        public static string Config { get; set; }
        public static string InletCode { get; set; }//输送线入库口  仓库出口
        public static string OutletCode {  get; set; }//输送线出库口  仓库入口
        public static string IsDebug {  get; set; }
        public static string EssIp {  get; set; }//ess 接口ip地址
        public static string slotCode {  get; set; }//容器流动方向
        public static void GetEnvironment()
        {
            EssIp = "192.168.188.236:9046";
            Machine = Environment.GetEnvironmentVariable("Machine", EnvironmentVariableTarget.Machine);
            Config = Environment.GetEnvironmentVariable("幸福起源-congfig", EnvironmentVariableTarget.Machine);
            IsDebug= Environment.GetEnvironmentVariable("IsDebug", EnvironmentVariableTarget.Machine);
            if (Machine == "1-1")//1#输送线出口
            {
                InletCode = "空";
                OutletCode = "1-1";
                slotCode = "2-4";
            }
            if(Machine == "2-2")//2#输送线出口
            {
                InletCode = "空";
                OutletCode = "LT_CONVEYOR_OUTPUT:POINT:1562:7583";
                slotCode = "2-4"; 
            }
            if (Machine == "2-1")//2#输送线入口
            {
                InletCode = "LT_CONVEYOR_INPUT:POINT:1562:2833";
                OutletCode = "空";
                slotCode = "2-4";
            }

        }
   
    }
}
